class UrlMappings {

	static mappings = {
		"/$controller/$action?/$id?"{
			constraints {
				// apply constraints here
			}
		}
		
		"/home"(controller:"start"){action=[GET:"startResource"]}
		"/players/$userId"(controller:"player"){action=[GET:"lookupPlayer"]}
		"/players/$userId/points"(controller:"player"){action=[GET:"lookupPlayerPoints"]}
		"/leaderboard/$period"(controller:"gameScore"){action=[GET:"leaderBoard"]}
		"/finishedgames/$gameSessionId"(controller:"game"){action=[GET:"lookupFinishedBoardSession"]}
    	"/games/$gameSessionId"(controller:"game"){action=[GET:"lookupBoardSession", POST:"addPlayerEvent"]}
    	"/games/$gameSessionId/events"(controller:"game"){ action = [GET:"lookupEvents"] }
		"/games/$gameSessionId/events/$round"(controller:"game"){ action = [GET:"lookupRoundEvent"] }
	
		"/tickets"(controller:"lobby"){action = [GET:"getAllTickets", POST:"createTicket"]}
		"/tickets/$ticketId"(controller:"lobby"){action = [GET:"getTicketById", POST:"updateTicket", DELETE:"deleteTicket"]}
		"/ticketsbyuserid/$userId"(controller:"lobby"){action = [GET:"getTicketByUserId"]}
		
		"/"(view:"/index")
		"500"(view:'/error')
	}
}
